#include "DevFindClient.h"
#include "DevFindProtocol.h"


CDevFindClient::CDevFindClient()
{

}

CDevFindClient::~CDevFindClient()
{

}

void CDevFindClient::init()
{
	m_spReactor.reset( new ACE_Reactor() );

	m_spThread.reset(new boost::thread( boost::bind(&CDevFindClient::start_event_loop, this ) ) );
}

void CDevFindClient::start_event_loop()
{
	if ( m_spReactor )
	{
		m_spReactor->reset_reactor_event_loop();
		m_spReactor->owner( ACE_Thread::self(), 0 );
		m_spReactor->run_reactor_event_loop();
	}
	else
	{
		qDebug("start_event_loop failed!\n");
	}
	qDebug("CAceReactorMgr::event_loop() end!\n");
}

int CDevFindClient::handle_input( ACE_HANDLE fd /*= ACE_INVALID_HANDLE */ )
{
	return 0;
}
